package com.hwtx.form.domain.repo;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hwtx.form.persistence.entity.ApiDef;
import com.hwtx.form.persistence.entity.ApiDefField;
import lombok.Builder;
import lombok.Getter;

import java.util.List;

public interface ApiRepo extends IService<ApiDef> {

    ApiDefField getApiDefField(ApiDefFieldQuery apiDefFieldQuery);

    List<ApiDefField> getApiDefFields(ApiDefFieldQuery apiDefFieldQuery);

    void saveDetails(ApiDefField apiDefField);

    ApiDef getApiDef(String code);

    boolean updateById(ApiDefField apiDefField);

    void removeApiFields(ApiDefFieldQuery apiDefFieldQuery);

    @Builder
    @Getter
    class ApiDefFieldQuery {
        Long id;
        Long modelDetailId;
        String apiCode;
    }
}
